<?php
namespace Tools\Controller;
use Common\Controller\HomebaseController;

/**
 * 下载文件
 */
class  DownloadController extends HomebaseController {


	public function index(){

		$lists = D('ToolsDownload')
				->order('download_id desc')
				->select();
		
		foreach ($lists as $key => $value) {
			$lists[$key]['post_time'] = date("m-d-Y",$value['add_date']);
			
		}

		foreach ($lists as $key2 => $value2) {
			$lists[$key2]['post_year'] = substr($value2['post_time'],'6','4'); 
			$lists[$key2]['post_day'] = substr($value2['post_time'],'3','2'); 
			$lists[$key2]['post_month'] =  change_Eng_month($value2['post_time']);
		}

		//赋值
		$this->assign('lists', $lists);
		$this->display("index");

	}

}
